package com.zxl.live.tools.anim;

import android.animation.Animator;

/**
 * 动画适配器
 * Created by Administrator on 2016/7/8.
 */
public class AnimatorAdapter implements Animator.AnimatorListener {

    private Animator.AnimatorListener mProxy;

    public AnimatorAdapter() {
    }

    public AnimatorAdapter(Animator.AnimatorListener mProxy) {
        this.mProxy = mProxy;
    }

    @Override
    public void onAnimationStart(Animator animation) {
        if (null != mProxy) {
            mProxy.onAnimationStart(animation);
        }
    }

    @Override
    public void onAnimationEnd(Animator animation) {
        if (null != mProxy) {
            mProxy.onAnimationEnd(animation);
        }
    }

    @Override
    public void onAnimationCancel(Animator animation) {
        if (null != mProxy) {
            mProxy.onAnimationCancel(animation);
        }
    }

    @Override
    public void onAnimationRepeat(Animator animation) {
        if (null != mProxy) {
            mProxy.onAnimationRepeat(animation);
        }
    }
}
